package com.matt.foundation.vo;

import lombok.Data;

import java.io.Serializable;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/11/15
 * *******************************
 */
@Data
public class GoodAdviserVo implements Serializable,Comparable<GoodAdviserVo> {

    //员工id
    private String staffId;

    //名称
    private String realName;

    //头像
    private String headImgUrl;

    //岗位
    private String positionName;

    //总数
    private int totalNum;

    @Override
    public int compareTo(GoodAdviserVo o) {
        int i= (o.totalNum-this.totalNum); //按总数降序排列
        return i;
    }

    public static  GoodAdviserVo of(String staffId,String realName,String headImgUrl,String positionName,int totalNum){
        GoodAdviserVo vo = new GoodAdviserVo();
        vo.setStaffId(staffId);
        vo.setRealName(realName);
        vo.setHeadImgUrl(headImgUrl);
        vo.setPositionName(positionName);
        vo.setTotalNum(totalNum);
        return vo;
    }

}
